package com.orange.eduservice.controller;

import com.orange.commonutils.result.Result;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;

/**
 * @author orange
 * @email orangestart@yeah.net
 * @create 2021-12-15 17:04
 */
@Api(tags = "用户登录")
@RestController
@RequestMapping("eduService/user")
@CrossOrigin    //开启跨域
public class EduLoginController {

    //login
    @PostMapping("/login")
    public Result login(){
        return Result.ok().data("token","admin");
    }

    //info
    @GetMapping("/info")
    public Result info(){
        return Result.ok().data("roles","admin").data("name","orange").data("avatar","https://orangestart.oss-cn-chengdu.aliyuncs.com/avatar/default");
    }
}
